<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/assets/view/base/tag.jsp" %>
<!DOCTYPE html>
<head>
    <title>mrcode</title>
    <jsp:include page="/assets/view/common/head-meta.jsp"/>
    <jsp:include page="/assets/view/common/head-ui.jsp"/>
    <%-- <link rel="stylesheet" href="/assets/lib/bootstrap/css/bootstrap.css">--%>
</head>
<body>
<jsp:include page="/assets/view/common/header.jsp"/>
<div class="container">
    <jsp:include page="menu.jsp"/>
    <div class="manager-table table-responsive">
        <table class="table table-striped table-hover" id="postTab">
            <tr>
                <th>名称</th>
                <th>文章</th>
                <th>排序</th>
                <th>操作</th>
            </tr>


            <c:choose>
                <c:when test="${not empty cats}">
                    <c:forEach items="${cats }" var="cat" varStatus="index">
                        <tr>
                            <td>${cat.name}</td>
                            <td><a href="/${cat.userAccount}/article/category/${cat.id}"><span class="badge">${cat.num}</span></a></td>
                            <td>
                                <a href="javascript:;"
                                   class="btn btn-mod btn-round btn-w icon-arrow-up">上移</a>
                                <a href="javascript:;"
                                   class="btn btn-mod btn-round btn-w icon-arrow-down">下移</a>
                            </td>
                            <td>
                                <a href="javascript:;"
                                   class="btn btn-mod btn-round btn-w icon-edit">编辑</a>
                                <a href="javascript:;"
                                   class="btn btn-mod btn-round btn-w icon-minus">删除</a>
                            </td>
                        </tr>
                    </c:forEach>
                </c:when>
                <c:otherwise>
                    <td>22</td>
                    <td>22</td>
                    <td>22</td>
                    <td>22</td>
                </c:otherwise>
            </c:choose>

        </table>
    </div>
</div>

<jsp:include page="/assets/view/common/footer.jsp"/>
<script src="${contextPath}/assets/lib/jquery.validate.js"></script>
<script src="${contextPath}/assets/js/mangaerComm.js"></script>
<script>
    $("#cats").addClass("active");

</script>
</body>
</html>
